package com.ykht.proj.activity.Enum;

/**
 * 卡 状态枚举类
 */
public enum CardStatusEnum {
	//卡 0上架中（立即上架）1待上架（预约上架）  2已下架
	AT_WORK(0,"上架中"),
	TO_START(1,"待上架"),
	BE_OVERDUE(2,"已下架");

	private Integer value;
	private String desc;

	private CardStatusEnum(Integer value, String desc) {
		this.value = value;
		this.desc = desc;
	}


	/**
	 * 根据val值获取desc
	 * @param val 1、0
	 * @return
	 */
	public static String getDescByVal(Integer val) {
		CardStatusEnum[] values = CardStatusEnum.values();
		for (CardStatusEnum oe : values) {
			if (oe.getValue().equals(val)) {
				return oe.getDesc();
			}
		}
		return null;
	}

	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
